<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>不好看的网盘</title>

    <!-- Bootstrap core CSS -->
    <link href="./dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="jumbotron-narrow.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="./dist/js/ie-emulation-modes-warning.js"></script>
    <style type="text/css">
      img{
        width: 30px;
        height: 30px;
      }
      input{
        display: inline-block;
        float: left;
      }
      .pagination{
        float: right;
      }
    </style> 


  <body>
    <div style="widht:100%; height:50px; background-color: #00AFC7"></div>

    
    <div class="container">
      <div class="header">
        <h3 class="text-muted">小丑网盘</h3>
      </div>

      <div class="jumbotron">
        
        
        <div class="table-responsive">
          <table class="table table-bordered">

            <form action="add.php" method="post" enctype="multipart/form-data"  >
              <input type="hidden" name="MAX_FILE_SIZE" value="3000000">
              <!-- <input type="file" name="file"  > -->
              <input type="file" name="file[]" multiple="multiple" >
              <input type="submit" value="上传">
            </form> 
            <nav>
              <ul class="pagination">
                <li><a href="./index.php?p=<?php echo $cs ; ?>">&laquo;</a></li>
                  <?php for ($i=1; $i <=$total ; $i++) {
                    if ($i<=1) {
                      if ($curren == $i) {?>
                        <li class="active"><a href="./index.php?p=<?php echo $i; ?>"><?php echo $i; ?></a></li>
                        <li><a href="./index.php?p=<?php echo ($i+1); ?>"><?php echo ($i+1);?></a></li>
                        <li><a href="./index.php?p=<?php echo ($i+2); ?>"><?php echo ($i+2);?></a></li>
                <?php } 
                    } elseif ($i>1 &&  $i<=($total-1)) {
                      if ($curren == $i) {?>
                        <li><a href="./index.php?p=<?php echo ($i-1); ?>"><?php echo ($i-1);?></a></li>
                        <li class="active"><a href="./index.php?p=<?php echo $i; ?>"><?php echo $i; ?></a></li>
                        <li><a href="./index.php?p=<?php echo ($i+1); ?>"><?php echo ($i+1);?></a></li>
                <?php } 
                    } elseif ($i>=$total) {
                      if ($curren == $i) {?>
                        <li><a href="./index.php?p=<?php echo ($i-2); ?>"><?php echo ($i-2);?></a></li>
                        <li><a href="./index.php?p=<?php echo ($i-1); ?>"><?php echo ($i-1);?></a></li>
                        <li class="active"><a href="./index.php?p=<?php echo $i; ?>"><?php echo $i; ?></a></li>
               <?php } 
                    }
                  } ?>

                <li><a href="./index.php?p=<?php echo $cz ; ?>">&raquo;</a></li>
              </ul>
            </nav>
            <thead>
              <tr>
                <th>序号</th>
                <th>样式</th>
                <th>文件名</th>
                <th>大小</th>
                <th>上传时间</th>
                <th>文件类型</th>
                <th>下载</th>
                <th>删除</th>
              </tr>
            </thead>
            <tbody>
              <?php foreach ($upload as $k=> $v) {?>
                <?php if ($k>=$z) {?>
                
                  <tr>
                    <td><?php echo ++$k ?></td>
                    <td><img src="<?php echo ($v ) ?>" alt=""> </td>
                    <td><?php echo basename($v ) ?></td>
                    <td><?php echo run(filesize($v)) ?></td>
                    <td><?php echo date("Y-m-d h:i:s",filemtime($v)) ?></td>
                    <td><?php echo endd(basename($v )) ?></td>
                    <td><a href="./down.php?url=<?php echo $v ?>"><input type="submit" value="下载"></a></td>
                    <td><a href="./erase.php?url=<?php echo $v?>"><input type="submit" value="删除"></a></td>
                  </tr>
                <?php } ?>
                <?php if ($k>=$cc) {

                       break ;
                  } 

                   ?> 
               <?php } ?>  
            </tbody>
          </table>
        </div><!-- /.table-responsive -->

      </div>

      <div class="row marketing">

      </div>

      <div class="footer">
        <p>&copy; Company 2016</p>
      </div>

    </div> <!-- /container -->


    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
   
  </body>
</html>